package com.smooth.site.sx.pc.jifen.controller;

import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.smooth.common.pc.interceptor.PcAccountContext;
import com.smooth.common.site.common.rsp.ReturnResult;
import com.smooth.dao.gen.bean.BizJifenLog;
import com.smooth.dao.gen.bean.BizStudent;
import com.smooth.site.sx.pc.jifen.service.PcJifenLogService;

@Controller
@RequestMapping(value = "/pc")
public class PcJifenController {
	@Autowired
	PcJifenLogService pcJifenLogService;
	
	@RequestMapping(value = {"c/jifen/loglist"},method = {RequestMethod.POST,RequestMethod.GET})
	@ResponseBody
	public ReturnResult list(HttpServletRequest request, HttpServletResponse response) {
		ReturnResult returnResult = new ReturnResult();
		BizStudent bizStudent = (BizStudent)PcAccountContext.getObj(BizStudent.class);
		List<BizJifenLog> bjlist = pcJifenLogService.queryJifenLog(bizStudent.getId());
		returnResult.setData(bjlist);
		return returnResult;
	}
	
}
